package com.link2room.ironhide.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by sss on 2016/9/13.
 */
@Entity
@Table(name = "l2r_hotel_picture", catalog = "")
@DynamicInsert
public class L2RHotelPicture extends BaseEntity{
    public enum L2RHotelPicture_{
        categroy,code,titl,src,remark
    }

    /**
     * 图片类别
     */
    private String categroy;
    /**
     * 图片代码
     */
    private String code;
    /**
     * 图片标题
     */
    private String titl;
    /**
     * 图片路径
     */
    private String src;
    /**
     * alt内容
     */
    private String alt;
    /**
     * 备注
     */
    private String remark;

    private String type;

    private String attribute;

    @Basic
    @Column(name = "categroy", nullable = true, length = 16)
    public String getCategroy() {
        return categroy;
    }

    public void setCategroy(String categroy) {
        this.categroy = categroy;
    }

    @Basic
    @Column(name = "code", nullable = false, length = 64)
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "titl", nullable = true, length = 64)
    public String getTitl() {
        return titl;
    }

    public void setTitl(String titl) {
        this.titl = titl;
    }

    @Basic
    @Column(name = "src", nullable = true, length = 255)
    public String getSrc() {
        return src;
    }

    public void setSrc(String src) {
        this.src = src;
    }

    @Basic
    @Column(name = "alt", nullable = true, length = 255)
    public String getAlt() {
        return alt;
    }

    public void setAlt(String alt) {
        this.alt = alt;
    }

    @Basic
    @Column(name = "remark", nullable = true, length = 255)
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "type", nullable = false, length = 32)
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "attribute", nullable = true, length = 32)
    public String getAttribute() {
        return attribute;
    }

    public void setAttribute(String attribute) {
        this.attribute = attribute;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RHotelPicture that = (L2RHotelPicture) o;

        if (categroy != null ? !categroy.equals(that.categroy) : that.categroy != null) return false;
        if (code != null ? !code.equals(that.code) : that.code != null) return false;
        if (titl != null ? !titl.equals(that.titl) : that.titl != null) return false;
        if (src != null ? !src.equals(that.src) : that.src != null) return false;
        if (alt != null ? !alt.equals(that.alt) : that.alt != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = categroy != null ? categroy.hashCode() : 0;
        result = 31 * result + (code != null ? code.hashCode() : 0);
        result = 31 * result + (titl != null ? titl.hashCode() : 0);
        result = 31 * result + (src != null ? src.hashCode() : 0);
        result = 31 * result + (alt != null ? alt.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        return result;
    }
}
